package com.binance.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Import;

import com.binance.feign.ribbon.config.FeignRibbonClientAutoConfiguration;
import com.binance.master.utils.IPUtils;

@SpringCloudApplication
@EnableZuulProxy
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class,
        org.springframework.cloud.netflix.feign.ribbon.FeignRibbonClientAutoConfiguration.class})
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.binance.authcenter.api"})
@Import(FeignRibbonClientAutoConfiguration.class)
public class GatewayApplication {

    public static void main(String[] args) {
        System.setProperty("local-ip", IPUtils.getIp());
        SpringApplication.run(GatewayApplication.class, args);
    }
}
